

import discord

# intents = discord.Intents.default()
# intents.messages = True
# class MyClient(discord.Client):
#     async def on_ready(self):
#         print('Logged on as', self.user)
#
#     async def on_message(self, message):
#         # don't respond to ourselves
#         if message.author == self.user:
#             return
#
#         if message.content == 'ping':
#             await message.channel.send('Cja ~~ pong')
#
#
# client = MyClient(intents=intents)
#
# client.run('MTIzNzU5MTY4MDE2MTU1MDMzNg.Gh4qzl.dY7uz4efPbtNojU-4tplaxqBJOPni--fYOkGuc')

intents = discord.Intents.default()
intents.message_content = True

client = discord.Client(intents=intents)

@client.event
async def on_ready():
    print(f'We have logged in as {client.user}')

@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content.startswith('hello bot'):
        await message.channel.send('Hello!')

client.run('MTIzNzU5MTY4MDE2MTU1MDMzNg.Gh4qzl.dY7uz4efPbtNojU-4tplaxqBJOPni--fYOkGuc')
